home *** CD-ROM | disk | FTP | other *** search
- /* 3DView.h Copyright 1993 Steve Ludtke */
- /* This is a N3DCamera subclass which displays molecules. */
- /* DrawPS handles the Quick mode */
-
- #import <3Dkit/N3DCamera.h>
-
- void *timer; /* timer for spinning, etc ... */
- void itstime(DPSTimedEntry entry,double now,id call);
-
- @interface D3View:N3DCamera
- {
- id mode; /* mouse mode selector (unused)*/
- id controller; /* points to MolObj */
- id shape; /* shape for rendering molecules */
- id ambLight; /* ambient light source */
- id aLight; /* directional light source */
- id flagSel; /* flag selector */
- id AICV; /* icon view */
- id AIMG,AIMGS[8]; /* images for animation of icon */
- float chi,theta,phi,dchi,dtheta; /* viewing angles/speeds */
- float lchi,ltheta; /* light angle */
- float edist; /* distance between viewer and origin */
- int Rmode,Rflags; /* display mode/flags */
- char initflag; /* flag so timer knows the first time it's called */
- Molecule *mol; /* As usual, this points to the molecule array */
- int nmol; /* # of molecules */
- int minshape; /* fitting (unused) */
- struct ELINFO *elinfo; /* element info table */
- int busy; /* busy flag to prefent server crash from QRM bug */
- int useColor; /* color display flag */
- char *bpath; /* path to MolViewer.app */
-
- int animicon; /* animate icon flag */
- NXPoint Ior1,Ior2; /* icon animation ref points */
-
- float path[3000]; /* user path data */
- int pathc;
- char ops[1500];
- }
-
-
- -initFrame:(NXRect *)myrect;
- -free;
-
- /* rescales coord. system after size chaged */
- -superviewSizeChanged:(const NXSize *)oldsize;
-
- /* change viewing angle */
- -setAng:(float)chi :(float)theta :(float)Phi;
-
- /* used to do mouse spinning */
- -mouseDown:(NXEvent *)event;
-
- /* points to controller object, usually set with IB instead */
- -setcontroller:del;
-
- /* called by timer to do one time step */
- -step;
-
- -(int)acceptsFirstMouse;
-
- /* display new data */
- -zoom:sender;
-
- /* toggles dchi=0 on and off */
- -togFreeze:sender;
-
- /* dump .rib file from 3d view */
- - dumpRib:sender;
-
- /* currently does nothing */
- - renderSelf:(RtToken)context;
-
- /* sets intensity of ambient light */
- - setAmbLight:sender;
-
- /* sets intensity of distant light */
- - setLight:sender;
-
- /* sets chi of distant light */
- - setLightX:sender;
-
- /* sets theta of distant light */
- - setLightY:sender;
-
- /* sets rendering mode */
- - setMode:sender;
-
- /* prints window with white background */
- - printPS:sender;
-
- /* set drawing flags */
- - setFlags:sender;
-
- -setData:(Molecule *)Mol :(int)Nmol :(struct ELINFO *)Elinfo;
-
- /* set camera<->molecule distance */
- -setEDist:sender;
-
- /* set 3rd angle (other 2 mouse drag controlled) */
- -setPhi:sender;
-
- /* generate animation */
- -ribRot:sender;
-
- /* used in fitting */
- -togMin:sender;
-
- -drawPS:(NXRect *)rects :(int)rectCount;
-
- /* eps dump of screen */
- -dumpEPS:sender;
-
- /* change color display flag */
- -setColor:sender;
-
- /* initialization stuff that must wait for everything to be loaded */
- - appDidInit: sender;
-
- /* dump a POV compatible file (used to be dkb) */
- -dkbDump:sender;
-
- /* supposed to help with QRM bug */
- - flushRIB;
- @end
-